<%= include ic/admin-header.html %>

<div class="am-cf admin-main">
  <%= include ic/admin-sidebar.html %>

  <!-- content start -->
  <div class="admin-content">

    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">首页</strong> / <small>一些常用模块</small></div>
    </div>

    <ul class="am-avg-sm-1 am-avg-md-4 am-margin am-padding am-text-center admin-content-list ">
      <li><a href="#" class="am-text-success"><span class="am-icon-btn am-icon-file-text"></span><br/>新增图片<br/><font id="countImage"> - </font></a></li>
      <li><a href="#" class="am-text-warning"><span class="am-icon-btn am-icon-briefcase"></span><br/>新增游迹<br/><font id="countTrip"> - </font></a></li>
      <li><a href="#" class="am-text-secondary"><span class="am-icon-btn am-icon-user-md"></span><br/>新增用户<br/><font id="countUser"> - </font></a></li>
      <li><a href="#" class="am-text-danger"><span class="am-icon-btn am-icon-exclamation-triangle"></span><br/>未处理举报<br/><font id="countReport"> - </font></a></li>
    </ul>
  </div>
  <!-- content end -->

</div>

<a class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<%= include ic/admin-footer.html %>
<script type="text/javascript">
$(function() {
	getCoutData();
});

function getCoutData(){
  $.get("count", {},function(data){
    $("#countImage").text(data.image);
    $("#countTrip").text(data.trip);
    $("#countUser").text(data.user);
    $("#countReport").text(data.report);
    //console.dir(data);
  }, "json");
}
</script>
